package com.ruoyi.yf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yf.mapper.YfUserMobileConnectionMapper;
import com.ruoyi.yf.domain.YfUserMobileConnection;
import com.ruoyi.yf.service.IYfUserMobileConnectionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户 手机终端关联Service业务层处理
 * 
 * @author XiaoYi...
 * @date 2020-03-17
 */
@Service
public class YfUserMobileConnectionServiceImpl implements IYfUserMobileConnectionService 
{
    @Autowired
    private YfUserMobileConnectionMapper yfUserMobileConnectionMapper;

    /**
     * 查询用户 手机终端关联
     * 
     * @param id 用户 手机终端关联ID
     * @return 用户 手机终端关联
     */
    @Override
    public YfUserMobileConnection selectYfUserMobileConnectionById(Long id)
    {
        return yfUserMobileConnectionMapper.selectYfUserMobileConnectionById(id);
    }

    /**
     * 查询用户 手机终端关联列表
     * 
     * @param yfUserMobileConnection 用户 手机终端关联
     * @return 用户 手机终端关联
     */
    @Override
    public List<YfUserMobileConnection> selectYfUserMobileConnectionList(YfUserMobileConnection yfUserMobileConnection)
    {
        return yfUserMobileConnectionMapper.selectYfUserMobileConnectionList(yfUserMobileConnection);
    }

    /**
     * 新增用户 手机终端关联
     * 
     * @param yfUserMobileConnection 用户 手机终端关联
     * @return 结果
     */
    @Override
    public int insertYfUserMobileConnection(YfUserMobileConnection yfUserMobileConnection)
    {
        yfUserMobileConnection.setCreateTime(DateUtils.getNowDate());
        return yfUserMobileConnectionMapper.insertYfUserMobileConnection(yfUserMobileConnection);
    }

    /**
     * 修改用户 手机终端关联
     * 
     * @param yfUserMobileConnection 用户 手机终端关联
     * @return 结果
     */
    @Override
    public int updateYfUserMobileConnection(YfUserMobileConnection yfUserMobileConnection)
    {
        yfUserMobileConnection.setUpdateTime(DateUtils.getNowDate());
        return yfUserMobileConnectionMapper.updateYfUserMobileConnection(yfUserMobileConnection);
    }

    /**
     * 删除用户 手机终端关联对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYfUserMobileConnectionByIds(String ids)
    {
        return yfUserMobileConnectionMapper.deleteYfUserMobileConnectionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户 手机终端关联信息
     * 
     * @param id 用户 手机终端关联ID
     * @return 结果
     */
    @Override
    public int deleteYfUserMobileConnectionById(Long id)
    {
        return yfUserMobileConnectionMapper.deleteYfUserMobileConnectionById(id);
    }
}
